<template>
    <div>
        <!-- <div class="seach">
            <span>
                {{$t('sta')}}
                <el-select v-model="chnlistForm.auditStatus" :placeholder="$t('plsset')" size="mini">
                    <el-option :label="'-' + $t('plsset') + '-'" :value="null"></el-option>
                    <el-option :label="$t('unaudited')" value="WAITCONFIRM"></el-option>
                    <el-option :label="$t('tobeaud')" value="TO_REVIEW"></el-option>
                    <el-option :label="$t('audpass')" value="SUCCESS"></el-option>
                    <el-option :label="$t('audfail')" value="ERROR"></el-option>
                </el-select>
            </span>
            <span class="seachStatus">
                {{$t('chnlnam')}}
                <el-input v-model="chnlistForm.merName" :placeholder="$t('plsipt')" size="mini"></el-input>
            </span>
            <el-button type="primary" @click="seach" size="mini">{{$t('qury')}}</el-button>
            <el-button @click="add" size="mini">{{$t('add')}}</el-button>
        </div> -->
        <!-- 内容区域 -->
        <el-card class="cardBox">
            <el-table border style="width: 100%" :data="chnlistTab">
                <el-table-column type="index" :label="$t('sernum')">
                </el-table-column>
                <el-table-column prop="channelId" :label="$t('chnnumber')">
                </el-table-column>
                <el-table-column prop="channelName" :label="$t('chnlnam')">
                </el-table-column>
                <el-table-column prop="channelType" :label="$t('chntype')">
                </el-table-column>
                <el-table-column prop="createUser" :label="$t('fonder')">
                </el-table-column>
                <el-table-column prop="modifyUser" :label="$t('modifier')">
                </el-table-column>
                <el-table-column prop="gmtModified" :label="$t('modtim')">
                </el-table-column>
                <!-- <el-table-column prop="address" :label="$t('opratn')" width="150" fixed="right">
                    <template slot-scope="scope">
                        <el-link type="primary" :disabled="scope.row.isAble" @click="handle(scope.row)">{{$t('mdfy')}}</el-link>
                        <el-link type="primary" @click="getproList(scope.row)">{{$t('productlist')}}</el-link>
                    </template>
                </el-table-column> -->
            </el-table>
            <!-- 分页 -->
            <!-- <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="chnlistForm.pageNum"
                :page-sizes="[10, 15, 20, 30]"
                :page-size="chnlistForm.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="total"
                :pager-count="5">
            </el-pagination> -->
        </el-card>
    </div>
</template>

<script>
import {
    getrouterchannellist
} from '@/libs/reqlist.js'
export default {
    data () {
        return {
            total: 0,
            chnlistForm: {
                pageNum: 1,
                pageSize: 10
            },
            chnlistTab: []
        }
    },
    methods: {
        getproFeedList() {
            getrouterchannellist().then(res => {
                if (res.status === 200) {
                    for (let i = 0; i < res.data.length; i++) {
                        let item = res.data[i]
                        if (item.channelType === 'BANK') item.channelType = this.$t('bank')
                        if (item.channelType === 'other') item.channelType = this.$t('other')
                    }
                    this.chnlistTab = res.data
                }
            })
        },
        seach() {
            this.getproFeedList()
        },
        add() {},
        handle(id) {},
        getproList(id) {},
        handleSizeChange (newSize) {
            this.cpequform.pageSize = newSize
            this.getproFeedList()
        },
        // 监听总页数变化
        handleCurrentChange (newNum) {
            this.cpequform.pageNum = newNum
            this.getproFeedList()
        }
    },
    mounted () {
        this.getproFeedList()
    }
}
</script>

<style lang="less" scoped>
@import './chnList.less';
</style>
